<template>
  <div class="container">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="pageSizes"
      :page-size="pageSize"
      layout="prev, pager, next,sizes,total, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
export default {
   props:{
    page:{default(){return 1},type:Number},
    pageSize:{default(){return 10},type:Number},
    pageSizes:{default(){return [10,20,50,80]},type:Array},
    total:{default(){return 0},type:Number},
   },
    methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.$emit('changepagesize',val)
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        this.$emit('changepage',val)
      }
    },
    data() {
      return {
        // currentPage4: 1
      };
    }
  }
</script>

<style lang="less" scoped>
.container {
  height: 70px;
  display: flex;
  justify-content: right;
  align-items: center;
  margin-top: 20px;
  margin-right: 20px;

  /deep/.el-pager li {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    border-radius: 50%;
    border: 1px solid rgb(133, 133, 133);
  }
  /deep/.el-pager li:hover {
    background-color: #5a6bef;
    color: white;
  }
  .el-input__inner{
    border: 0;
  }
}
</style>